package com.example.demo.serviceImpl;

import com.example.demo.bean.UserBean;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public UserBean userLogin(String account,String psw){
        return userMapper.userLogin(account,psw);
    }

    @Override
    public boolean userRegist(UserBean userBean){
        return userMapper.userRegist(userBean)>0?true:false;
    }

    @Override
    public boolean userFingAccount(String account){
        return userMapper.userFingAccount(account)==null?false:true;
    }

    @Override
    public boolean userChangeData(UserBean userBean){
        return userMapper.userChangeData(userBean)>0?true:false;
    }
}
